<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/WEB-INF/templates/master_frame.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:my="http://java.sun.com/jsf/composite/components">

	<ui:define name="title"> - Login</ui:define>

	<ui:define name="content">

		<h2>Anmeldung</h2>

		<h:form>
			<!-- The original user URI request  -->
			<input type="hidden" name="requestedURL"
				value="#{requestScope['javax.servlet.forward.request_uri']}" />

			<h:panelGrid border="1" columns="1">

				<c:set var="login" value="Email/Benutzername" />

				<rich:message for="username" />
				<h:inputText id="username" value="#{loginController.username}"
					onblur="if(this.value==''){this.value='#{login}'}"
					onfocus="if(this.value=='#{login}'){this.value=''}" required="true"
					requiredMessage="You must provide a username." title="#{login}"
					styleClass="normaltip" style="width: 90%;">
					<rich:validator />
				</h:inputText>


				<rich:message for="password" />
				<h:inputSecret id="password" value="#{loginController.password}"
					required="true" requiredMessage="You must provide a password."
					title="Password" styleClass="normaltip">
					<rich:validator />
				</h:inputSecret>

				<a4j:commandButton styleClass="pro_btn" value="Login" render="@all"
					execute="@form" action="#{loginController.login}">
				</a4j:commandButton>


				<ui:remove>
					<a4j:ajax onsubmit="disableScreen()" oncomplete="enableScreen()"
						event="click" status="statusfield">
					</a4j:ajax>
				</ui:remove>

				<a4j:status id="statusfield" startText="Verify login ..."
					stopText="" />

				<p />
				<h:messages errorClass="invalid" />


				<rich:notifyStack id="infoStack" position="topLeft"
					direction="vertical" method="first" />
				<rich:notifyMessages stack="infoStack" stayTime="3000"
					nonblocking="false" showCloseButton="true" showShadow="true" />


			</h:panelGrid>

		</h:form>
		<p />

		<span class="pro_info">Benutzername oder Passwort vergessen?
			Wiederherstellen.</span>
		<p />
		<span class="pro_info pro_info_warning">Ihre Daten werden stets
			vertraulich behandelt. Ihre Anmeldeinformationen sind zudem mit
			maximaler Stärke verschlüsselt. </span>

	</ui:define>
</ui:composition>